package by.grsu.epam;


public class Runner {
/*
	public static void main(String[] args) throws IOException {
		Runner runner = new Runner();
		List<User> users = new ArrayList<User>();
		
		// Start users:
		users.add(new Subscriber("qwerty", "John", "Smith", "Aleksander", "123"));
		users.add(new Subscriber("homer112", "Homer", "Simpson", "Jay", "qwe"));
		
		Scanner in = new Scanner(System.in);
		System.out.print("Input command: ");
		String command = in.nextLine();
		
		while(!"exit".equals(command)){
			if("addUser".equals(command)){
				runner.addUser(users);
			}else if("checkUsers".equals(command)){
				runner.checkUsers(users);
			}else{
				System.out.println("Incorrect command");
			}
			

			System.out.println("Commands:");
			System.out.println("- addUser");
			System.out.println("- checkUsers");
			System.out.println("- exit");
			System.out.print("Input command: ");	
			command = in.nextLine();	
		}
	}
	
	public void addUser(List<User> users){
		Scanner in = new Scanner(System.in);
		
		System.out.print("Input username: ");
		String username = in.nextLine();
		System.out.print("Input firstname: ");
		String firstname = in.nextLine();
		System.out.print("Input secondname: ");
		String secondname = in.nextLine();
		System.out.print("Input middlename: ");
		String middlename = in.nextLine();
		System.out.print("Input password: ");
		String password = in.nextLine();
		
		Subscriber newSubscriber = new Subscriber(username, firstname,
				secondname, middlename, password);
		
		users.add(newSubscriber);
	}
	
	public void checkUsers(List<User> users){
		System.out.println("=============Users=============");
		for(User user : users){
			System.out.println("User: " + user.getUsername());
			System.out.println("Firstname: " + user.getFirstname());
			System.out.println("Secondname: " + user.getLastname());
			System.out.println("Middlename: " + user.getMiddlename());
			System.out.println("Password: " + user.getPassword());
			System.out.println("===============================");
		}
	}
*/
}
